package com.mars.tukuan.utils.file;

import java.io.Serializable;

public class FileMeta implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 文件名称
	 */
	private String fileName ;
	
	/**
	 * 文件类型
	 */
	private String contentType ;
	
	/**
	 * 文件大小
	 */
	private long size ;
	
	/**
	 * 将文件大小单位换算
	 */
	private String convertUnitSize ;
	
	/**
	 * 文件基本名称
	 */
	private String baseName ;
	
	/**
	 * 文件扩展名称
	 */
	private String extension ;
	
	/**
	 * 文件上传后的真实名称（随机生成）
	 */
	private String newName ;
	
	/**
	 * 文件上传目标路径
	 */
	private String destDir;
	
	/**
	 * 文件上传全路径
	 */
	private String destFilePath;
	
	/**
	 * 文件上传相对路径
	 */
	private String destBasePath ;
	
	/**
	 * 文件上传服务器域名
	 */
	private String originDomain ;
	
	/**
	 * 文件访问的URL
	 */
	private String fileUrl ;
	
	/**
	 * 状态（true：成功，false：失败）
	 */
	private boolean status ;
	
	/**
	 * 响应消息
	 */
	private String message ;
	
	public FileMeta() {
	}

	public FileMeta(boolean status, String message) {
		super();
		this.status = status;
		this.message = message;
	}

	public FileMeta(String fileName, String contentType, long size, String convertUnitSize, String baseName, String extension, String newName, String destBasePath, String originDomain, String fileUrl, boolean status, String message) {
		super();
		this.fileName = fileName;
		this.contentType = contentType;
		this.size = size;
		this.convertUnitSize = convertUnitSize;
		this.baseName = baseName;
		this.extension = extension;
		this.newName = newName;
		this.destBasePath = destBasePath;
		this.originDomain = originDomain;
		this.fileUrl = fileUrl;
		this.status = status;
		this.message = message;
	}

	public FileMeta(String fileName, String contentType, long size, String convertUnitSize, String baseName, String extension, String newName, String destDir, String destFilePath, String destBasePath, String originDomain, String fileUrl, boolean status, String message) {
		super();
		this.fileName = fileName;
		this.contentType = contentType;
		this.size = size;
		this.convertUnitSize = convertUnitSize;
		this.baseName = baseName;
		this.extension = extension;
		this.newName = newName;
		this.destDir = destDir;
		this.destFilePath = destFilePath;
		this.destBasePath = destBasePath;
		this.originDomain = originDomain;
		this.fileUrl = fileUrl;
		this.status = status;
		this.message = message;
	}

	public String getFileName() {
		return fileName;
	}

	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getContentType() {
		return contentType;
	}

	public void setContentType(String contentType) {
		this.contentType = contentType;
	}

	public long getSize() {
		return size;
	}

	public void setSize(long size) {
		this.size = size;
	}

	public String getConvertUnitSize() {
		return convertUnitSize;
	}

	public void setConvertUnitSize(String convertUnitSize) {
		this.convertUnitSize = convertUnitSize;
	}

	public String getBaseName() {
		return baseName;
	}

	public void setBaseName(String baseName) {
		this.baseName = baseName;
	}

	public String getExtension() {
		return extension;
	}

	public void setExtension(String extension) {
		this.extension = extension;
	}

	public String getNewName() {
		return newName;
	}

	public void setNewName(String newName) {
		this.newName = newName;
	}

	public String getDestDir() {
		return destDir;
	}

	public void setDestDir(String destDir) {
		this.destDir = destDir;
	}

	public String getDestFilePath() {
		return destFilePath;
	}

	public void setDestFilePath(String destFilePath) {
		this.destFilePath = destFilePath;
	}

	public String getDestBasePath() {
		return destBasePath;
	}

	public void setDestBasePath(String destBasePath) {
		this.destBasePath = destBasePath;
	}

	public String getOriginDomain() {
		return originDomain;
	}

	public void setOriginDomain(String originDomain) {
		this.originDomain = originDomain;
	}

	public String getFileUrl() {
		return fileUrl;
	}

	public void setFileUrl(String fileUrl) {
		this.fileUrl = fileUrl;
	}

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return String.format("\r\nFileResult [\r\n\tfileName=%s, \r\n\tcontentType=%s, \r\n\tsize=%s, \r\n\tconvertUnitSize=%s, \r\n\tbaseName=%s, \r\n\textension=%s, \r\n\tnewName=%s, \r\n\tdestDir=%s, \r\n\tdestFilePath=%s, \r\n\tdestBasePath=%s, \r\n\toriginDomain=%s, \r\n\tfileUrl=%s, \r\n\tstatus=%s, \r\n\tmessage=%s\r\n]", fileName, contentType, size, convertUnitSize, baseName, extension, newName, destDir, destFilePath, destBasePath, originDomain, fileUrl, status, message);
	}
	
	

	
}
